package jsr292.weaver.opt;

import jsr292.java.lang.invoke.CallSite;

import org.objectweb.asm.MethodVisitor;

public final class OptimizerContext {
    private final MethodVisitor mv;
    private final Class<?> classBeingRedefined;
    private final /*maybenull*/CallSite callSite;
    private final OptimizerBoundMap boundMap;

    public OptimizerContext(Class<?> classBeingRedefined, /*maybenull*/CallSite callSite, OptimizerBoundMap boundMap, MethodVisitor mv) {
	this.classBeingRedefined = classBeingRedefined;
        this.callSite = callSite;
	this.boundMap = boundMap;
	this.mv = mv;
    }

    public Class<?> getClassBeingRedefined() {
        return classBeingRedefined;
    }
    
    public MethodVisitor mv() {
	return mv;
    }
    
    public /*maybenull*/CallSite getCallSite() {
        return callSite;
    }
    
    public OptimizerBoundMap getBoundMap() {
	return boundMap;
    }
}
